package com.naiterui.ehp.bs.cms.modules.statistics.mapper;

import java.util.List;
import java.util.Set;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.naiterui.ehp.bp.bo.statistics.RecipelRankingBO;
import com.naiterui.ehp.bs.cms.common.constants.DsName;
import com.naiterui.ehp.bs.cms.modules.agent.vo.AgentAchievementListVO;
import com.naiterui.ehp.bs.cms.modules.agent.vo.AgentAchievementVO;
import com.naiterui.ehp.bs.cms.modules.agent.vo.AreaStatisticsVO;
import com.naiterui.ehp.bs.cms.modules.agent.vo.BusinessStatisticsVO;
import com.naiterui.ehp.bs.cms.modules.statistics.entity.AsRecipelCount;
import com.naiterui.ehp.bs.cms.modules.statistics.vo.AsRecipelConsultVO;
import com.naiterui.ehp.bs.cms.modules.statistics.vo.DataReportRecipelTotalVO;

/**
 * 经纪人统计-处方相关统计
 *
 * @author yangfuya
 * @since 2022/2/16
 */
@DS(DsName.EHP)
public interface AsRecipelCountMapper extends BaseMapper<AsRecipelCount> {

    AsRecipelConsultVO getRecipelConsultTotal(Long doctorId);

    List<AsRecipelConsultVO> getRecipelConsult(Long doctorId, String typeFormat, String dateFormat, String reportDate);

    DataReportRecipelTotalVO getRecipelTotalDataReport(Long agentId);

    List<DataReportRecipelTotalVO> getRecipelDataReport(Long agentId, String typeFormat, String dateFormat,
        String reportDate);

    List<DataReportRecipelTotalVO> getRecipelCountList(Long agentId, List<String> dateList);

    BusinessStatisticsVO getAllRecipelTotal();

    BusinessStatisticsVO getYesterdayRecipelTotal();

    Integer getAllInviteTotal();

    BusinessStatisticsVO getYesterdayInviteTotal();

    List<AreaStatisticsVO> getAreaStatistics(Set<Long> idSet);

    AgentAchievementVO getRecipelAndOrderPriceByAgentId(Long agentId);

    List<AgentAchievementVO> getRecipelAndOrderPriceInAgentId(List<Long> agentIds);

    List<DataReportRecipelTotalVO> getRecipelCountListByDate(Long agentId, String typeFormat, String dateFormat,
        List<String> dateList);

    List<RecipelRankingBO> getRecipelRanking(Long areaId, String generateDateStr);

    Long getAgentAreaId(Long agentId);

    List<AgentAchievementListVO> exportAgentRecipelList(List<String> agentIdList, String dateFormat,
        List<String> reportDateList);
}
